# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=heaptrack
pkgver=1.5.0
pkgrel=3
arch=(loong64 x86_64)
pkgdesc='A heap memory profiler for Linux'
url='http://milianw.de/tag/heaptrack'
license=(GPL)
depends=(boost-libs
         gcc-libs
         glibc
         kconfig5
         kconfigwidgets5
         kcoreaddons5
         kdiagram5
         ki18n5
         kiconthemes5
         kio5
         kwidgetsaddons5
         libelf
         libunwind
         qt5-base
         qt5-svg
         threadweaver5)
makedepends=(boost
             extra-cmake-modules
             kitemmodels5
             sparsehash)
source=(https://download.kde.org/stable/$pkgname/$pkgver/$pkgname-$pkgver.tar.xz{,.sig})
sha256sums=('a278d9d8f91e8bfb8a1c2f5b73eecab47fd45d0693f5dbea637536413cec2ea5'
            'SKIP')
validpgpkeys=(3D8568869097C65C98F8D2760C0EB212CD1D1393
              C51B45A532F17FA401D099A0A0C6B72C4F1C5E7C) # Milian Wolff <mail@milianw.de>

build() {
  cmake -B build -S $pkgname-$pkgver \
   -DCMAKE_INSTALL_PREFIX=/usr \
   -DBUILD_TESTING=OFF
  cmake --build build
}

package(){
  DESTDIR="$pkgdir" cmake --install build
}
